home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (October 1991)
/
HamCall (Whitehall Publishing)(1991).bin
/
prgming
/
pastut
/
function.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-10-14
|
487b
|
26 lines
(* Chapter 5 - Program 6 *)
program Example_Function;
var Dogs,Cats,Feet : integer;
function Quad_Of_Sum(Number1,Number2 : integer) : integer;
begin
Quad_Of_Sum := 4*(Number1 + Number2);
end;
begin (* main program *)
Dogs := 4;
Cats := 3;
Feet := Quad_Of_Sum(Dogs,Cats);
Writeln(' There are a total of',Feet:3,' paws.');
end. (* of main program *)
{ Result of execution
There are a total of 28 paws.
}